@import (reference) 'config';
@import (reference) 'icons';
@import (reference) '../../app/less/typography';
@import (reference) '../../app/less/app-icons';

body.welcome {
  width: 100%;
  overflow: hidden;
  font-size: 15px;
  margin: 0 auto;
  font-weight: normal;
  color: @color-basic-900;
  max-width: 100%;

  .white-bg {
    background: @color-white;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 0;
  }

  div.wrapper {
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    width: 100%;
    max-width: 100%;
    height: calc(~'100%' - 60px);
  }

  .wrapper {
    margin-top: 60px;
  }

  a {
    text-decoration: none;
  }

  ul {
    list-style-type: none;
  }

  h2 {
    font-weight: 400;
  }

  section {
    width: 100%;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    overflow: hidden;
    max-width: 100%;
  }

  .get-started-btn {
    margin-right: 15px;
    position: relative;
    .fake-button-content {
      padding-right: 50px;
    }

    .icon-arrow-right {
      margin-left: 10px;
      display: block;
      width: 24px;
      height: 24px;
      transition: .3s;
      position: absolute;
      right: 20px;
      top: 50%;
      box-shadow: none;
      transform: translate(0, -50%);
      background-image: @arrow-white-right;
      background-color: transparent;
    }

    &:hover {
      .icon-arrow-right {
        transform: translate(7px, -50%);
      }
    }
  }

  .markets-table-description {
    display: flex;
    flex-direction: row;
    a {
      display: inline-block;
      margin-left: 4px;
    }
  }

  .table-markets {
    border-radius: 4px;
    background: @color-white;
    width: 100%;
    box-shadow: @shadow-dex-welcome;

    .cell {
      width: ~"calc((100% - 190px) / 5)";
      max-width: ~"calc((100% - 190px) / 5)";
      overflow: hidden;
      vertical-align: middle;
      white-space: nowrap;
    }

    .graph {
      width: 110px;
      height: 36px;
      line-height: 36px;
      margin-left: 10px;
      position: relative;
    }

    @media screen and (min-width: 1024px) {
      .volume {
        padding-right: 30px;
      }

      .volume,
      .height24,
      .low24,
      .change {
        text-align: right;
      }
    }

    .change {
      padding-left: 10px;
    }

    .row {
      display: flex;
      font-size: 15px;
      align-items: center;
      height: 70px;
      padding: 0 40px;
      position: relative;
      color: inherit;
      transition: .3s;

      &.red {
        .change {
          color: @color-error-500;
        }
      }

      &.blue {
        .change {
          color: @color-submit-400;
        }
      }

      &-content {
        cursor: pointer;
        &:hover {
          background: #f9fbfd;
          box-shadow: 0px 1px 0px 0px #f9fbfd, 0px -1px 0px 0px #f9fbfd;
        }

        .pair {
          font-weight: 600;
          font-family: 'Roboto-regular';
        }

        &:not(:last-child)::after {
          content: '';
          display: block;
          bottom: 0;
          position: absolute;
          width: calc(100% ~'- 80px');
          height: 1px;
          background: @color-info-50;
        }
      }

      &-header {
        font-size: 13px;
        border-bottom: 1px solid @color-info-50;
      }
    }
  }
}

.section-wrapper {
  margin: 0 auto;
  padding-left: @welcomeSectionWrapperPaddingLarge;
  padding-right: @welcomeSectionWrapperPaddingLarge;
  max-width: 1440px;
  width: 100%;
}

.section {
  &-welcome {
    display: block;
    height: 770px;
    align-items: center;
    width: 100%;
    background: @color-white;

    .section-wrapper {
      display: flex;
      height: 100%;
      align-items: center;
    }

    .welcome-text {
      font-size: 50px;
      font-weight: 500;
      line-height: 1.4;
      font-family: 'Roboto-Regular';
    }

    .left-side {
      max-width: 540px;
      z-index: 2;
    }

    .submit {
      margin-right: 15px;
    }

    .dex-screenshot {
      left: calc(50% ~'- 50px');
      max-width: calc(50% ~'+ 50px');
      @dex-screenshot-width: 2732px;
      @dex-screenshot-height: 1536px;
      width: calc(@dex-screenshot-width / 2.7);
      height: calc(@dex-screenshot-height / 2.7);
      display: block;
      position: absolute;
      top: 90px;
      box-shadow: 0 0 30px @color-basic-200;
      z-index: 1;
      transition: .5s;
      background: url(/img/landing/dex-screenshot.png) left center no-repeat @color-white;
      background-size: cover;
    }
  }

  &-markets {
    background: @color-info-50;
    max-width: 100%;
    padding: 0;

    &-description {
      max-width: 660px;
      margin: auto;
    }

    .section-wrapper {
      max-width: 1440px;
      margin: 0 auto;
      padding-bottom: 60px;

      h2 {
        margin-top: 0;
      }
    }
  }

  &-slider {
    padding: 0;
    background: @color-info-50;
    overflow: hidden;
    position: relative;
    max-width: 100%;

    &:before {
      position: absolute;
      width: 100%;
      height: 100%;
      display: block;
      content: '';
      background: @color-info-50;
    }
  }

  &-promo {
    .section-wrapper {
      display: flex;
      align-items: flex-start;
      text-align: center;
      flex-wrap: wrap;
      padding-bottom: 60px;
      justify-content: center;
    }

    &::before {
      position: absolute;
      background: @color-white;
      width: 5000px;
      height: 100%;
      left: 50%;
      transform: translateX(-50%);
      top: 0;
      display: block;
      content: '';
      z-index: -1;
    }

    &-card {
      padding: 20px 0;
      width: 100%;
      min-width: 280px;
    }

    &-title {
      font-weight: 400;
      margin-top: 0;
    }
  }
}

@media screen and (max-width: 1440px) {
  body.welcome {

    .section-wrapper {
      padding-left: @welcomeSectionWrapperPaddingMedium;
      padding-right: @welcomeSectionWrapperPaddingMedium;
    }

    .section-welcome {
      .welcome-text {
        font-size: 44px;
        line-height: 1.3;
      }

      .left-side {
        max-width: 480px;
      }

      .dex-screenshot {
        right: auto;
        left: calc(50% ~'- 100px');
        max-width: calc(50% ~'+ 100px');
      }
    }
  }
}

@media screen and (max-width: 1340px) {
  body.welcome {
    .section-welcome {
      .dex-screenshot {
        left: 580px;
        max-width: calc(100% ~'- 580px');
      }

      .welcome-text {
        font-size: 40px;
        line-height: 1.2;
      }
    }
  }
}

@media screen and (max-width: 1024px) {
  body.welcome {
    .links {
      padding-left: 30px;
    }

    .section-welcome {
      .left-side {
        max-width: 480px;
      }
    }
  }
}

@media screen and (max-width: 1023px) and (min-width: 861px) {
  body.welcome {
    .section-welcome {
      .left-side {
        max-width: 45%;
      }

      .dex-screenshot {
        left: 50%;
        max-width: 50%;
      }
    }
  }
}

@media screen and (max-width: 860px) {
  body.welcome {
    font-size: 13px;

    .table-markets {
      .row {
        padding: 15px 86px 15px 15px;
        flex-wrap: wrap;

        &-header {
          display: none;
        }

        .cell {
          flex-basis: 50%;
          width: 50%;
          max-width: 50%;
          font-size: 13px;
          padding: 0;
        }

        .low24,
        .height24 {
          display: none;
        }

        .graph {
          width: 50px;
          height: 35px;
          position: absolute !important;
          right: 15px;
          canvas {
            position: static !important;
          }
        }

        .volume {
          order: 3;
          color: @color-basic-500;
        }

        .last-price {
          order: 2;
          text-align: right;
        }

        .change {
          order: 4;
          text-align: right;
        }

        .hight24,
        .low24 {
          display: none;
        }
      }
    }

    .section-welcome {
      height: auto;

      .left-side {
        max-width: 100%;
      }

      .buttons-wrapper {
        flex-direction: column;
        width: 100%;
        margin-bottom: 82px;

        .fake-button {
          width: 100%;
        }

        .get-started-btn {
          margin: 0 0 15px;
        }
      }

      .welcome-text {
        position: relative;
        padding-top: 90px;
        font-size: 28px;
      }

      .dex-screenshot {
        display: none;
      }
    }

    .section-promo {
      .section-wrapper {
        flex-direction: column;
        padding-top: 25px;
        padding-bottom: 25px;
      }
    }
  }
}

@media screen and (max-width: 480px) {
  body.welcome {
    .section-wrapper,
    .section-markets .content-wrapper {
      padding-left: @welcomeSectionWrapperPaddingSmall;
      padding-right: @welcomeSectionWrapperPaddingSmall;
    }
    footer {
      .section-wrapper {
        margin-top: 0px;
      }
    }
  }
}

@media screen and (min-width: 860px) {
  body.welcome {
    .section {
      &-promo {
        .section-wrapper {
          text-align: left;
        }

        &-card {
          padding: 20px 30px 20px 4px;
          flex-basis: 50%;
          display: flex;
          flex-direction: row;
        }

        &-content {
          margin-left: 20px;
        }
      }
    }
  }
}

@media screen and (min-width: 992px) {
  body.welcome {
    .section {
      &-promo {
        &-card {
          flex-basis: 33.33%;
        }
      }
    }
  }
}

